package com.tonyodev.fetch2okhttp;

import com.tonyodev.fetch2core.FetchCoreUtils;

import java.net.CookieHandler;
import java.net.CookieManager;

import okhttp3.CookieJar;
import okhttp3.JavaNetCookieJar;

/**
 * @since 2021-05-20
 */
public class OkHttpUtils {

    public static final CookieJar getDefaultCookieJar() {
        CookieManager cookieManager = FetchCoreUtils.getDefaultCookieManager();
        return new JavaNetCookieJar(cookieManager);
    }
}
